from tortoise import BaseDBAsyncClient


async def upgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `tb_monitor_task` MODIFY COLUMN `args` JSON COMMENT '位置参数';
        ALTER TABLE `tb_monitor_task` MODIFY COLUMN `kwargs` JSON COMMENT '关键字参数';"""


async def downgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `tb_monitor_task` MODIFY COLUMN `args` VARCHAR(20) COMMENT '位置参数';
        ALTER TABLE `tb_monitor_task` MODIFY COLUMN `kwargs` VARCHAR(20) COMMENT '关键字参数';"""
